#include "bitmap.h"


MY_U16 LOS_HighBitGet(MY_U32 bitmap)
{
    if(bitmap == 0)
    {
        return INVALID_BIT_INDEX;
    }
	//31 - 前导零 个数
    return (0x1F - CLZ(bitmap));
}


//计算后导零
MY_U16 LOS_LowBitGet(MY_U32 bitmap)
{
    if(bitmap == 0)
    {
        return INVALID_BIT_INDEX;
    }
	
    return CTZ(bitmap);
}





